<template>
  <div>
    <van-nav-bar  left-arrow  @click-left="onClickLeft" >
      <template #title >
        <slot></slot>
      </template>
      <template #left >
      </template>

    </van-nav-bar>
  </div>
</template>
<script>
import Vue from 'vue';
import { NavBar } from 'vant';
import { Icon } from 'vant'
Vue.use(Icon)
Vue.use(NavBar);
export default {
  name: 'NavBar',
  methods: {
    onClickLeft() {
      this.$router.back()
    },

  },
}
</script>

<style scoped>
div{
  position: sticky;
  top: 0;
}
</style>
